<?php
if (!defined('IN_FINECMS')) exit('No permission resources');

return array(
    "DROP TABLE IF EXISTS `{prefix}buy`;",
	"CREATE TABLE IF NOT EXISTS `{prefix}buy` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `cid` int(10) NOT NULL,
  `order_sn` bigint(20) NOT NULL,
  `userid` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `username` char(20) NOT NULL,
  `money` decimal(10,2) NOT NULL,
  `addtime` int(10) NOT NULL DEFAULT '0',
  `paytime` int(10) NOT NULL DEFAULT '0',
  `paytype` char(10) NOT NULL,
  `ip` char(15) NOT NULL DEFAULT '0.0.0.0',
  `adminnote` char(20) NOT NULL,
  `status` tinyint(3) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `order_sn` (`order_sn`),
  KEY `userid` (`userid`,`cid`),
  KEY `status` (`status`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;"
);
